package server;

import java.rmi.Naming; 
import java.util.logging.Logger;
import java.rmi.registry.LocateRegistry;

import logger.OurLogger;

public class ForumServer {
		
	private static Logger serverLogger = new OurLogger("logger.txt").logger;
	
	public ForumServer() {
		try {
			
			LocateRegistry.createRegistry(1099);
			
			ForumHandlerInt forumHandler = new ForumHandler();
//			System.out.println("dsfs");
			Naming.rebind("rmi://localhost:1099/ForumService", forumHandler);
		} catch (Exception e) {
			System.out.println("Trouble: " + e);
		}
	}
	   
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		serverLogger.info("server is starting");
		new ForumServer();
	}

}



